#!/usr/bin/python

import time
from math import sqrt, ceil

def isprime(num):
    ans = True
    for n in xrange(2, int(ceil(sqrt(num)))+1):
        if num % n == 0:
            ans = False
            break

    return ans

def main():
    """ What is the 10 001st prime number?"""
    start = time.time()
    prime = 1
    i = 3

    while prime != 10001:
        if isprime(i) is True:
            prime += 1
            if prime <= 6:
                print 'Prime {0} is {1}'.format(prime, i)
            if prime == 10001:
                print '\nPrime {0} is {1}\n'.format(prime, i)
        i += 2
    
    print '{0:.2f} s'.format(time.time() - start)        


if __name__ == '__main__':
  main()
